"""'create_root_user'

Revision ID: 105bd2347fa1
Revises: a30d6296777c
Create Date: 2017-03-01 16:53:45.103632

"""

# revision identifiers, used by Alembic.
revision = '105bd2347fa1'
down_revision = 'a30d6296777c'

from alembic import op
import sqlalchemy as sa

from auth.services.auth import AuthService
from auth.services.user import UserService


def upgrade():
    from sqlalchemy.orm import  sessionmaker

    session = sessionmaker(bind=op.get_bind())()
    from init_data.user import init_root_user
    init_root_user(op.get_bind())
    pass


def downgrade():
    # AdminUserService.delete(screen_name='root')
    # AuthService.delete_local_auth(login_name='root')
    pass